<template>
	<view class="good-info-box">
		<view class="good-imgs">
			<swiper indicator-dots="true" interval="5000" autoplay="true">
				<swiper-item class="swiper-item">
					<image src="../../static/goods/bz.webp"></image>
				</swiper-item>
				<swiper-item>
					<image src="../../static/goods/tj.webp"></image>
				</swiper-item>
				<swiper-item>
					<image src="../../static/goods/tj.webp"></image>
				</swiper-item>
			</swiper>
		</view>
		<view class="good">
			<view class="good-title">商品标题</view>
			<view class="good-desc">描述</view>
			<view class="spec">
				<view class="spec-key" >
				杯型
				</view>
				<view class="spec-value">
					<view >大杯</view>
					<view>中杯</view>
					<view>小杯</view>
				</view>
			</view>
			<view class="cart">
				<view class="unit">
					<view>18元</view>
					<view class="number">
						<view class="subtract">-</view>
						<view class="add">+</view>
					</view>
				</view>
				<view class="addCart">加入购物车</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.good-info-box{
		padding-left: 15rpx;
	}
	.swiper-item {
		width: 100%;
	}
	.good-title{
		margin-top: 20rpx;
	}
	.good-desc{
		margin-top: 10rpx;
	}
	.spec{
		margin-top: 40rpx;
	}
	.spec-value{
		display: flex;
		view{
			border: 1rpx;
			border-style: solid;
			border-color: gainsboro;
			padding: 15rpx;
			border-radius: 10rpx;
			margin-right: 10rpx;
		}
	}
	.cart{
		padding: 20rpx;
		border-style: solid;
		border-color: gainsboro;
		position: absolute;
		bottom: 10rpx;
		width: 90%;
		.unit{
			display: flex;
			justify-content: space-between;
		}
		.addCart{
			margin-top: 10rpx;
			padding: 20rpx;
			border-radius: 60rpx;
			background-color: greenyellow;
			text-align: center;
		}
	}
	.number{
		display: flex;
		.subtract{
			border: 0.5rpx;
			border-radius: 90rpx;
			border-style: solid;
			border-color: gray;
			width: 30rpx;
			height: 30rpx;
			align-items: center;
			display: flex;
			justify-content: center;
			margin-right: 20rpx;
		}
		.add{
			border-radius: 90rpx;
			width: 30rpx;
			height: 30rpx;
			align-items: center;
			display: flex;
			justify-content: center;
			background-color: greenyellow;
		}
	}
</style>
